package com.qianyu.project.mapper;

import com.qianyu.project.entity.AttachemenInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 附件文件表 Mapper 接口
 * </p>
 *
 * @author gs
 * @since 2021-01-30
 */
@Repository
public interface AttachemenInfoMapper extends BaseMapper<AttachemenInfo> {

    @Select("select * from attachemen_info ai ,device_require_plan drp where drp.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures(String split);

    @Select("select * from attachemen_info ai ,device_oil_used dou where dou.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures2(String attachIds);

    @Select("select * from attachemen_info ai ,device_maintain dm where dm.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures3(String attachIds);

    @Select("select * from attachemen_info ai ,device_collect dm where dm.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures4(String attachIds);


    @Select("select * from attachemen_info ai ,device_inspect dm where dm.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures5(String attachIds);

    @Select("select * from attachemen_info ai ,device_repair dm where dm.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures6(String attachIds);

    @Select("select * from attachemen_info ai ,device_scrap dm where dm.attach_ids=ai.id and  ai.id in (${value}) ")
    List<AttachemenInfo> selectEnclosures7(String attachIds);
}
